<%--
  Created by IntelliJ IDEA.
  User: Fish
  Date: 2022/11/10
  Time: 14:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<link rel="stylesheet" href="${pageContext.request.contextPath}/statics/layui/css/layui.css">
<html>
<head>
  <title>修改用户信息</title>
</head>
<body>
<script src="${pageContext.request.contextPath}/statics/layui/layui.js"></script>
<form class="layui-form" action="${pageContext.request.contextPath}/supplier/update"  <%--onsubmit="return false"--%> method="post">
  <input type="text" name="Id" value="${supplier.id}" style="display: none">
  <div class="layui-form-item">
    <label class="layui-form-label">供货商编号</label>
    <div class="layui-input-inline">
      <input type="text" name="supCode" required value="${supplier.supCode}"  lay-verify="required" placeholder="请输入供货商编号" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">供货商名称</label>
    <div class="layui-input-inline">
      <input type="text" name="supName" required  value="${supplier.supName}"   lay-verify="required" placeholder="请输入供货商名称" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">供货商描述</label>
    <div class="layui-input-block">
      <input type="text" name="supDesc" required   value="${supplier.supDesc}" lay-verify="required" placeholder="请输入输入框内容" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">供货商联系人</label>
    <div class="layui-input-inline">
      <input type="text" name="supContact" required  value="${supplier.supContact}"  lay-verify="required" placeholder="请输入供货商联系人内容" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">联系电话</label>
    <div class="layui-input-inline">
      <input type="text" name="supPhone" required  value="${supplier.supPhone}"  lay-verify="required" placeholder="请输入联系电话内容" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">供货商地址</label>
    <div class="layui-input-inline">
      <input type="text" name="supAddress" required  value="${supplier.supAddress}"  lay-verify="required" placeholder="请输入供货商地址内容" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">传真</label>
    <div class="layui-input-inline">
      <input type="text" name="supFax" required   value="${supplier.supFax}" lay-verify="required" placeholder="请输入传真内容" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">创建人ID</label>
    <div class="layui-input-inline">
      <input type="text" name="createdUserId" required   value="${supplier.createdUserId}" lay-verify="required" placeholder="请输入传真内容" autocomplete="off" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo"  type="submit">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>
<%--<script>
  layui.use('form', function(){
    var form = layui.form;
    var $ = layui.$;
    form.on('submit(formDemo)', function(data){
      // layer.msg(JSON.stringify(data.field));
      $.ajax({
        url:'${pageContext.request.contextPath}/supplier/update',
        type:'post',
        data:{
          supCode:data.field.supCode,
          supName:data.field.supName,
          supDesc:data.field.supDesc,
          supContact:data.field.supContact,
          supPhone:data.field.supPhone,
          supAddress:data.field.supAddress,
          supFax:data.field.supFax,
          createdUserId:data.field.createdUserId
        },
        async:false,
        success:function (da){
          if (da=="true"){
            layer.msg("修改成功")
          }else {
            layer.msg("修改失敗")
          }
        }
      })
      return false;
    });
  });
</script>--%>
</body>
</html>

